package com.u8.sdk;

import org.json.JSONObject;

/***
 * 支付参数
 * 
 * @author xiaohei
 * 
 */
public class PayParams {

	private String orderKey;
	private String productId;
	private String productName;
	private String productDesc;
	private int price;
	private int ratio; // 兑换比例，如果price为0， ratio=10，
						// 则表示1元RMB可以兑换10个product.如果price>0,则为定额支付。ratio无效
	private int buyNum;
	private int coinNum;
	private String serverId;
	private String serverName;
	private String roleId;
	private String roleName;
	private int roleLevel;
	private String payNotifyUrl;
	private String vip;
	private String orderID;
	private String extension;

	public String toJsonString() {
		try {
			JSONObject json = new JSONObject();
			json.put("orderID", orderID);
			json.put("orderKey", orderKey);
			json.put("productId", productId);
			json.put("productName", productName);
			json.put("productDesc", productDesc);
			json.put("price", price);
			json.put("ratio", ratio);
			json.put("buyNum", buyNum);
			json.put("coinNum", coinNum);
			json.put("serverId", serverId);
			json.put("serverName", serverName);
			json.put("roleId", roleId);
			json.put("roleName", roleName);
			json.put("roleLevel", roleLevel);
			json.put("vip", vip);
			json.put("extension", extension);
			json.put("payNotifyUrl", payNotifyUrl);
			return json.toString();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return "";
	}

	public String getProductId() {
		return productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public String getProductDesc() {
		return productDesc;
	}

	public void setProductDesc(String productDesc) {
		this.productDesc = productDesc;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public int getBuyNum() {
		return buyNum;
	}

	public void setBuyNum(int buyNum) {
		this.buyNum = buyNum;
	}

	public int getCoinNum() {
		return coinNum;
	}

	public void setCoinNum(int coinNum) {
		this.coinNum = coinNum;
	}

	public String getServerId() {
		return serverId;
	}

	public void setServerId(String serverId) {
		this.serverId = serverId;
	}

	public String getRoleId() {
		return roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public int getRoleLevel() {
		return roleLevel;
	}

	public void setRoleLevel(int roleLevel) {
		this.roleLevel = roleLevel;
	}

	public String getExtension() {
		return extension;
	}

	public void setExtension(String extension) {
		this.extension = extension;
	}

	public int getRatio() {
		return ratio;
	}

	public void setRatio(int ratio) {
		this.ratio = ratio;
	}

	public String getServerName() {
		return serverName;
	}

	public void setServerName(String serverName) {
		this.serverName = serverName;
	}

	public String getVip() {
		return vip;
	}

	public void setVip(String vip) {
		this.vip = vip;
	}

	public String getPayNotifyUrl() {
		return payNotifyUrl;
	}

	public void setPayNotifyUrl(String payNotifyUrl) {
		this.payNotifyUrl = payNotifyUrl;
	}

	public String getOrderID() {
		return orderID;
	}

	public void setOrderID(String orderID) {
		this.orderID = orderID;
	}

	public String getOrderKey() {
		return orderKey;
	}

	public void setOrderKey(String orderKey) {
		this.orderKey = orderKey;
	}

}
